﻿using System;
using System.Reflection;

namespace GojiSoft.EventSequenceUnitTesting.ExampleSupport {
    public static class ReflectionUtils {
        public static void PrintProperties(object @object) {
            Type type = @object.GetType();

            PropertyInfo[] properties = type.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.GetProperty);

            foreach(PropertyInfo info in properties) {
                object value = info.GetValue(@object, null);

                string message = ("  " + info.Name + " = " + value);

                Console.WriteLine(message);
            }
        }
    }
}